function getDatasetEntities(dataset){
    var C = [];
    for (var A = 0; A < dataset.values.length; A++) {
        var B = dataset.values[A];
        if (B.status == Entity.STATUS_DELT) continue;
        if (B.status == Entity.STATUS_HIDDEN) continue;
        C.push(B);
    }
    return C
}


SAIPJSon = {
  
  JsonRequest:null,
  callback:null,
  requestAysc:false,
  
  init:function(){
    if(window.ActiveXObject){
      SAIPJSon.JsonRequest= new ActiveXObject("Microsoft.XMLHTTP");
    } else if(window.XMLHttpRequest){
      SAIPJSon.JsonRequest= new XMLHttpRequest();
    }
  },
  
  postJSONRequest:function(callfunc, method, jsondata, url, aysc){
    SAIPJSon.init();
    try{
      SAIPJSon.callback = callfunc;
      SAIPJSon.JsonRequest.onreadystatechange = SAIPJSon.handleStateChange;
      if (!aysc) 
         SAIPJSon.requestAysc = false; //默认不采用异步方式
      else
         SAIPJSon.requestAysc = aysc;
 
      SAIPJSon.JsonRequest.open(method, url, SAIPJSon.requestAysc);
      SAIPJSon.JsonRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;application/json;");
      SAIPJSon.JsonRequest.send(jsondata);
      if (!SAIPJSon.requestAysc){
        SAIPJSon.callback(SAIPJSon.JsonRequest.responseText); 
      }
      
    }catch(exception){
     alert("xmlHttp Fail" + exception);
    }
  },
  
  handleStateChange:function(){
  //|| SAIPJSon.JsonRequest.status == 0
   if (SAIPJSon.requestAysc && (SAIPJSon.JsonRequest.readyState == 4) && (SAIPJSon.JsonRequest.status == 200 )){
      SAIPJSon.callback(SAIPJSon.JsonRequest.responseText);
   }
  }
};      
var jrq = SAIPJSon.postJSONRequest;
